/**
 * Created by Administrator on 2016/11/15.
 */
function showPic(whichpic) {
    var source = whichpic.getAttribute('href');
    var placeholder = document.getElementById('placeholder');
    placeholder.setAttribute('src', source);
    var text = whichpic.getAttribute('title');
    var description = document.getElementById('description');
    description.firstChild.nodeValue = text;
}

function countBodyChildren() {
    var body = document.getElementsByTagName('body')[0];
    alert(body.childNodes.length);
}

window.onload = countBodyChildren;